package com.lucky.auth_boot.controller;

import com.lucky.auth_boot.common.Result;
import com.lucky.auth_boot.pojo.po.SystemConfigPO;
import com.lucky.auth_boot.service.SystemConfigService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/system")
public class SystemConfigController {
    @Resource
    SystemConfigService systemConfigService;

    @PutMapping("/putSiteSettings")
    public Result<?> putSiteSettings(@RequestBody SystemConfigPO config) {
        return Result.success(systemConfigService.putSiteSettings(config));
    }

    @GetMapping("/getSiteSettings")
    public Result<?> getSiteSettings() {
        return Result.success(systemConfigService.getSiteSettings());
    }
}
